import request from '@/utils/request'

// 查询退单规则列表
export function listChargebackRules(query) {
  return request({
    url: '/quick/chargebackRules/list',
    method: 'get',
    params: query
  })
}

// 查询退单规则详细
export function getChargebackRules(id) {
  return request({
    url: '/quick/chargebackRules/' + id,
    method: 'get'
  })
}

// 新增退单规则
export function addChargebackRules(data) {
  return request({
    url: '/quick/chargebackRules',
    method: 'post',
    data: data
  })
}

// 修改退单规则
export function updateChargebackRules(data) {
  return request({
    url: '/quick/chargebackRules',
    method: 'put',
    data: data
  })
}

// 删除退单规则
export function delChargebackRules(id) {
  return request({
    url: '/quick/chargebackRules/' + id,
    method: 'delete'
  })
}
